﻿#region Copyright and license information
// Copyright 2001-2009 Stephen Colebourne
// Copyright 2009-2011 Jon Skeet
// 
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// 
//     http://www.apache.org/licenses/LICENSE-2.0
// 
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion

using System.Runtime.CompilerServices;

namespace NodaTime.Xml
{
    /// <summary>
    ///   The NodaTime.Xml namespace contains types related to XML (Extensible Markup Language).
    /// </summary>
    /// <remarks>
    /// <para>
    ///   XML serialisation is supported by various Noda types by implementing the <see cref="System.Xml.Serialization.IXmlSerializable"/>
    ///   interface. Most Noda Time types are serialised as a restricted version of some XML date/time type.  For example, <see cref="Instant"/> requires
    ///   a time zone offset of "Z".
    /// </para>
    /// <para>
    ///   The specific representation of a Noda type as XML data is determined by the <see cref="NodaXmlConvert"/> class. All Noda XML types
    ///   are specified in the <see cref="NodaTimeSchema.Schema">Noda XML Schema (XSD)</see>
    ///   with <see cref="NodaTimeSchema.Namespace">this namespace</see>. They are 
    ///   <see href="http://msdn.microsoft.com/en-us/library/ms256106.aspx">simple content</see> as is expected for a .Net value type.
    /// </para>
    /// <para>
    ///   Currently, because XML date times are based on the <see cref="CalendarSystem.Iso">ISO standard calendar</see>, only local date/times associated with 
    ///   this calendar can be serialised/deserialised. 
    /// </para>
    /// <para>
    ///   XML serialisation and deserialisation is free of charge for your classes that use a Noda type. No attribute markup or configuration is required. 
    ///   For example:
    /// </para>
    /// <para>
    /// <code>
    ///    public class DateRulz
    ///    {
    ///        public RecurrenceRule Rule { get; set; }
    ///        public ZonedDateTime Start { get; set; }
    ///        public int PageNumber { get; set; }
    ///        public int PageSize { get; set; }
    ///        public ZonedDateTime[] Results { get; set; }
    ///
    ///        public void GenerateResults()
    ///        {
    ///            Results = Rule
    ///                .Enumerate(Start)
    ///                .Skip((PageNumber - 1) * PageSize)
    ///                .Take(PageSize)
    ///                .ToArray();
    ///        }
    ///    }
    /// </code>
    /// </para>
    /// <para>
    /// When FriggaTriskaidekaPhobia is invoked,
    /// </para>
    /// <code>
    ///    public void FriggaTriskaidekaPhobia()
    ///    {
    ///        var rulz = new DateRulz
    ///       {
    ///            Rule = RecurrenceRule.Parse("rrule:freq=monthly;byday=fr;bymonthday=13"),
    ///            Start = NewZealand.AtStrictly(LocalBasic.Parse("20121027T000000").Value),
    ///            PageNumber = 1,
    ///            PageSize = 13
    ///        };
    ///        rulz.GenerateResults();
    ///     }
    /// </code>
    /// <para>
    ///    <b>DateRulz</b> would be serialised as:
    /// </para>
    /// <code>
    /// &lt;DateRulz>
    ///  &lt;Rule>RRULE:FREQ=MONTHLY;BYDAY=FR;BYMONTHDAY=13&lt;/Rule>
    ///  &lt;Start>2012-10-27T00:00:00+13:00@Pacific/Auckland&lt;/Start>
    ///  &lt;PageNumber>1&lt;/PageNumber>
    ///  &lt;PageSize>13&lt;/PageSize>
    ///  &lt;Results>
    ///    &lt;zonedDateTime>2013-09-13T00:00:00+12:00@Pacific/Auckland&lt;/zonedDateTime>
    ///    &lt;zonedDateTime>2013-12-13T00:00:00+13:00@Pacific/Auckland&lt;/zonedDateTime>
    ///    &lt;zonedDateTime>2014-06-13T00:00:00+12:00@Pacific/Auckland&lt;/zonedDateTime>
    ///    &lt;zonedDateTime>2015-02-13T00:00:00+13:00@Pacific/Auckland&lt;/zonedDateTime>
    ///    &lt;zonedDateTime>2015-03-13T00:00:00+13:00@Pacific/Auckland&lt;/zonedDateTime>
    ///    &lt;zonedDateTime>2015-11-13T00:00:00+13:00@Pacific/Auckland&lt;/zonedDateTime>
    ///    &lt;zonedDateTime>2016-05-13T00:00:00+12:00@Pacific/Auckland&lt;/zonedDateTime>
    ///    &lt;zonedDateTime>2017-01-13T00:00:00+13:00@Pacific/Auckland&lt;/zonedDateTime>
    ///    &lt;zonedDateTime>2017-10-13T00:00:00+13:00@Pacific/Auckland&lt;/zonedDateTime>
    ///    &lt;zonedDateTime>2018-04-13T00:00:00+12:00@Pacific/Auckland&lt;/zonedDateTime>
    ///    &lt;zonedDateTime>2018-07-13T00:00:00+12:00@Pacific/Auckland&lt;/zonedDateTime>
    ///    &lt;zonedDateTime>2019-09-13T00:00:00+12:00@Pacific/Auckland&lt;/zonedDateTime>
    ///   &lt;zonedDateTime>2019-12-13T00:00:00+13:00@Pacific/Auckland&lt;/zonedDateTime>
    ///  &lt;/Results>
    ///&lt;/DateRulz>
    /// </code>
    /// </remarks>
    [CompilerGenerated]
    internal class NamespaceDoc
    {
        // No actual code here - it's just for the sake of documenting the namespace.
    }
}
